package com.company.gas.service.impl;


import com.company.gas.mapper.InstallMapper;
import com.company.gas.pojo.Install;
import com.company.gas.service.IInstallService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class InstallServiceImpl implements IInstallService {
    @Autowired
    private InstallMapper installMapper;

    @Override
    public List<Install> queryInstallList(){
        List<Install> installList = installMapper.selectAll();
        return installList;
    }

    @Override
    public Install queryInstallById(String facId) {
        Install install =installMapper.queryInstallById(facId);
        System.out.println(install);
        return install;
    }

    @Override
    public int addInstall(String istId, String istDes, String istPro, Date istTime, Integer flag, Date createTime, String createBy, Date modifyTime, String modifyBy, String cusId) {
        installMapper.addInstall(istId,istDes,istPro,istTime,flag,createTime,createBy,modifyTime,modifyBy,cusId);
        return 1;
    }

    @Override
    public int updateInstall(String istDes, String istPro, Date istTime,Date modifyTime, String modifyBy, String cusId) {
        installMapper.updateInstall(istDes,istPro,istTime,modifyTime,modifyBy,cusId);
        return 1;
    }

    @Override
    public int deleteInstall(String istId) {
        installMapper.deleteInstall(istId);
        return 1;
    }

}
